package cn.itsource.hrm.controller;


import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/employee")
public class EmployeeController {


    @RequestMapping("/add")
    @PreAuthorize("hasAuthority('employee:add')")
    public String add(){
        return "employee.add";
    }

    @RequestMapping("/delete")
    @PreAuthorize("hasAuthority('employee:delete')")
    public String delete(){
        return "employee.delete";
    }

    @RequestMapping("/update")
    @PreAuthorize("hasAuthority('employee:update')")
    public String update(){
        return "employee.update";
    }

    @RequestMapping("/list")
    @PreAuthorize("hasAuthority('employee:list')")
    public String list(){
        return "employee.list";
    }
}
